package com.stylefeng.guns.core.util.excel.demo.analyze;

import com.stylefeng.guns.core.util.excel.AnalyzeExcelXlsComponent;
import com.stylefeng.guns.core.util.excel.demo.DemoExcelBo;
import org.apache.poi.hssf.usermodel.HSSFRow;

/**
 * 导入案例仅供参考
 *
 * @author carloszhang
 */
public class DemoExcelAnalyze extends AnalyzeExcelXlsComponent<DemoExcelBo> {

    @Override
    protected DemoExcelBo buildData(HSSFRow row) {
        DemoExcelBo excelBo = new DemoExcelBo();
        excelBo.setId(getValue(getCell(row, 0)));
        excelBo.setName(getValue(getCell(row, 1)));
        return excelBo;
    }
}
